package com.hacpai.android.md.model.api;

import android.os.Build;

import com.hacpai.android.md.BuildConfig;

public final class ApiDefine {

    private ApiDefine() {}

    public static final String HOST_BASE_URL = "https://hacpai.com";
    public static final String API_BASE_URL = HOST_BASE_URL + "/api/v2/";
    //验证码图片地址
    public static final String Captcha_BASE_URL = HOST_BASE_URL + "/captcha/login?needCaptcha=";

    public static final String USER_PATH_PREFIX = "/member/";
    public static final String USER_LINK_URL_PREFIX = HOST_BASE_URL + USER_PATH_PREFIX;
    public static final String TOPIC_PATH_PREFIX = "/topic/";
    public static final String TOPIC_LINK_URL_PREFIX = HOST_BASE_URL + TOPIC_PATH_PREFIX;

    public static final String USER_AGENT = "CNodeMD/" + BuildConfig.VERSION_NAME + " (Android " + Build.VERSION.RELEASE + "; " + Build.MANUFACTURER + " - " + Build.MODEL + ")";

    public static final boolean MD_RENDER = true; // 使用服务端Markdown渲染可以轻微提升性能

    //登录post Body类
    public static final class LoginUser {
        private String userName;
        private String userPassword;
        private String captcha;

        public LoginUser(String userName, String userPassword, String captcha) {
            this.userName = userName;
            this.userPassword = userPassword;
            this.captcha = captcha;
        }
    }

    public  static final class PostArticle{
        private  String articleTitle;
        private  String articleTags;
        private  String articleContent;
        private  String articleRewardContent;
        private  int articleRewardPoint;

        public PostArticle(String articleTitle, String articleTags, String articleContent, String articleRewardContent, int articleRewardPoint) {
            this.articleTitle = articleTitle;
            this.articleTags = articleTags;
            this.articleContent = articleContent;
            this.articleRewardContent = articleRewardContent;
            this.articleRewardPoint = articleRewardPoint;
        }
    }
}
